package com.zhoushihao.class0818;

import java.util.ArrayList;
import java.util.List;

public class Company {
    public static void main(String[] args) {
        List<Employee> employeeList = new ArrayList<>();

        Employee developEmployee
                = new DevelopEmployee("1001","zhangsan", 200);

        employeeList.add(developEmployee);
//        System.out.println(developEmployee.ComputeSalary());
        Employee testEmployee = new TestEmployee("1002"
                ,"lisi", 100);
        employeeList.add(testEmployee);
//        System.out.println(testEmployee.ComputeSalary());

        Employee boss = new Boss("0000", "wangwu",30000);
        employeeList.add(boss);

        Employee salesman = new SaleEmployee("0001","bob",2000,1000000,0.02);
        employeeList.add(salesman);

        int sum = 0;
        for(Employee employee : employeeList){
            sum += employee.ComputeSalary();
        }
        System.out.println(sum);
    }
}
